#pragma once

#include "XiInclude.hpp"
#include "XiCharStream.hpp"
#include "XiRecognizer.hpp"
#include "XiToken.hpp"
#include "XiUnicodeTable.hpp"

XI_NAMESPACE_BEGIN

class XiLexer : public XiRecognizer
{
public:
	XiLexer(XiCharStream &input);
public:
	void NextToken(XiToken &token);
private:
	void CheckKeyword(XiToken &token);
	void ParseEscape(XiToken &token);
private:
	const XiUnicodeTable &m_unicodeTable;
	const XiKeywordTable &m_keywordTable;	
	XiCharStream &m_input;
	XiChar m_char;
	XiCharStream::Location m_location;
};

XI_NAMESPACE_END